package services

import (
	"TaskAssignmentSystem/internal/admin/dao"
	"time"
)

type SystemAdvService struct {
}

func (s *SystemAdvService) AdvClick(advId, userId uint) error {
	var advLog dao.SystemAdvLog
	advLog.AdvId = advId
	advLog.SystemUserId = userId
	advLog.ClickTime = time.Now()
	var advDaoLog dao.Common[dao.SystemAdvLog]
	if err := advDaoLog.CreateOne(advLog).Error; err != nil {
		return err
	}
	return nil
}
